/**
 * creation: 7-mrt-2008
 */
package org.jfonia.connect;

/**
 * @author wijnand.schepens@gmail.com
 *
 */
public class ChangeIndicator extends BasicNode implements MutableValue<Boolean>
{
	boolean changed = false;
	
	public ChangeIndicator() {
	}

	public ChangeIndicator(Caller source) 
	{	
		source.addCallTarget(this);
	}

	public boolean call(Object param)
	{
		changed = true;
		return super.call(this);
	}
	
	public Boolean get()
	{
		return changed;
	}

	public void set(Boolean newValue)
	{
		changed = newValue;
		super.call(this);
		// not: call(this);  !
	}
}
